import Router from 'vue-router'
import TodoView from './views/TodosView.vue'

Vue.use(Router)

function createStoriesView(type) {
	return {
		name: `${type}-stories-view`,
		render(createElement) {
			return createElement(StoriesView, { props: { type }})
		}
	}
}

export default new Router({
	routes: [
		{
			path: '/todos',
			component: {
				name: 'todos-view',
				render(createElement) {
					return createElement(TodoView)
				}
			}
		},
		{ path: '/', redirect: '/todos'}
	]
})